package com.easy.project.domain.dto.system;

import com.easy.project.base.validate.EnumValidate;
import com.easy.project.constant.BooleanEnum;
import com.easy.project.constant.NewTabEnum;
import com.easy.project.constant.SexEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import java.time.LocalDate;

/**
 * 菜单新增/修改的dto
 *
 * @author wxz
 */
@Data
@ApiModel("MenuEditDTO")
public class MenuEditDTO {

    @ApiModelProperty("菜单id 有则修改 无则新增")
    private Long id;

    @ApiModelProperty("菜单名")
    @Length(min = 1, max = 50, message = "菜单名长度超出范围")
    private String menuName;

    @ApiModelProperty("菜单编码")
    @Length(min = 1, max = 50, message = "菜单编码长度超出范围")
    private String menuCode;

    @ApiModelProperty("菜单路由(外联以http开头)")
    @Length(min = 1, max = 200, message = "菜单路由长度超出范围")
    private String menuRouter;

    @ApiModelProperty("菜单icon")
    @Length(max = 50, message = "菜单icon长度超出范围!")
    private String menuIcon;

    @ApiModelProperty("0 当前页打开 1 新标签页打开")
    @NotNull
    @EnumValidate(baseEnum = NewTabEnum.class)
    private Integer newTab;

    @ApiModelProperty("所属的父id")
    private Long parentId;

}
